/**
 * Copyright (C), 2017, 用友政务
 * Author:      liwd
 * Date:        2018-06
 * Description: Redux store(生产环境)
 * History:
 */
import { applyMiddleware, createStore } from 'redux'
import thunk from 'redux-thunk'
import reducer from '../reducers/index'

//异步中间
const middleware = [thunk]

// 创建一个 Redux store 来以存放应用中所有的 state，应用中应有且仅有一个 store。
const store = createStore(
  reducer,
  applyMiddleware(...middleware),
)

export default store
